package com.example.june.zhanghaoguanli;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.ListView;

import com.longfly_example.e_scale.R;

import java.util.ArrayList;
import java.util.List;

public class Activity_spxx extends AppCompatActivity {

    ListView myListView ;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_spxx);
        List<LianxirenBean_spxx> itemBeanList = new ArrayList<LianxirenBean_spxx>();

        itemBeanList.add(new LianxirenBean_spxx("苹果","123456","1550","9.9",R.drawable.editor,R.drawable.delete));
        itemBeanList.add(new LianxirenBean_spxx("草莓","546656","885","8.9",R.drawable.editor,R.drawable.delete));
        itemBeanList.add(new LianxirenBean_spxx("橙子","432423","670","12.9",R.drawable.editor,R.drawable.delete));
        itemBeanList.add(new LianxirenBean_spxx("柠檬","777845","80","8.9",R.drawable.editor,R.drawable.delete));
        itemBeanList.add(new LianxirenBean_spxx("葡萄","989803","70","15.9",R.drawable.editor,R.drawable.delete));
        itemBeanList.add(new LianxirenBean_spxx("雪梨","322556","1500","6.9",R.drawable.editor,R.drawable.delete));
        itemBeanList.add(new LianxirenBean_spxx("香蕉","772554","500","3.9",R.drawable.editor,R.drawable.delete));

        myListView =(ListView)findViewById(R.id.lv_spxx);
        //设置ListView的数据适配器
        myListView.setAdapter(new Myadapter_spxx(this,itemBeanList));
    }
}
